function time(times) {
  var time = new Date(times)
  let year = time.getFullYear()
  let month = time.getMonth() + 1 > 10 ? time.getMonth() + 1 : '0' + (time.getMonth() + 1)
  let day = time.getDate() >= 10 ? time.getDate() : '0' + time.getDate()
  let hour = time.getHours() >= 10 ? time.getHours() : '0' + time.getHours()
  let min = time.getMinutes() >= 10 ? time.getMinutes() : '0' + time.getMinutes()
  var date = year + '-' + month + '-' + day + ' ' + hour + ':' + min
  return date
}
export default time